package org.elephas.webapp.frontend.page;

import org.apache.wicket.Component;
import org.elephas.model.ElephasConfiguration;
import org.elephas.webapp.application.ElephasApplication;
import org.elephas.webapp.frontend.component.RecentPostsPanel;

/**
 * Renders the recent posts across all blogs.
 * 
 * @see ElephasConfiguration#getPostsOnFrontPage()
 * 
 * @author Gerolf Seitz
 * 
 */
public class FrontPage extends BasePage {

	private static final long serialVersionUID = 1L;

	@Override
	protected Component newContent(String id) {
		ElephasConfiguration config = ElephasApplication.get()
				.getElephasConfiguration();
		return new RecentPostsPanel(id, null, config.getPostsOnFrontPage());
	}
}